home *** CD-ROM | disk | FTP | other *** search
/ L'Encyclopedie Des Jeux Video 8 / EJV8_CD2.ISO / ejv8-cd2 / viewer.dxr / 00040_roll text.ls < prev    next >
Encoding:
Text File  |  2003-10-24  |  2.4 KB  |  88 lines

  1. property choix_line, forcol, select, roll, VieilLine, entreList
  2.  
  3. on getPropertyDescriptionList
  4.   description = [:]
  5.   addProp(description, #forcol, [#default: 0, #format: #integer, #comment: "Couleur du champ ├á l'├⌐tat normal" & QUOTE, #range: [#min: 0, #max: 255]])
  6.   addProp(description, #roll, [#default: 35, #format: #integer, #comment: "Couleur de la ligne en " & QUOTE & "Rollover" & QUOTE, #range: [#min: 0, #max: 255]])
  7.   addProp(description, #select, [#default: 255, #format: #integer, #comment: "Couleur de la s├⌐lection", #range: [#min: 0, #max: 255]])
  8.   return description
  9. end
  10.  
  11. on beginSprite me
  12.   choix_line = VOID
  13.   VieilLine = 0
  14.   entreList = 0
  15.   member(the memberNum of sprite the currentSpriteNum).foreColor = forcol
  16.   member(the memberNum of sprite the currentSpriteNum).scrollTop = 0
  17. end
  18.  
  19. on endSprite me
  20. end
  21.  
  22. on mouseDown me
  23.   if choix_line <> VOID then
  24.     set the foreColor of line choix_line of member the memberNum of sprite the currentSpriteNum to forcol
  25.   end if
  26.   if the mouseLine = -1 then
  27.     nothing()
  28.   else
  29.     choix_line = the mouseLine
  30.   end if
  31.   cursor(-1)
  32. end
  33.  
  34. on mouseLeave me
  35.   entreList = 0
  36.   set the foreColor of line VieilLine of member the memberNum of sprite the currentSpriteNum to forcol
  37.   cursor(-1)
  38. end
  39.  
  40. on mouseWithin me
  41.   entreList = entreList + 1
  42.   if the mouseLine <> -1 then
  43.     leNom = the mouseLine
  44.     mouse_sur_line(leNom)
  45.     if entreList = 1 then
  46.       VieilLine = leNom
  47.     end if
  48.     VieilLine = leNom
  49.   end if
  50.   cursor(280)
  51. end
  52.  
  53. on prepareFrame me
  54.   choix_ligne()
  55. end
  56.  
  57. on mouse_sur_line X
  58.   if X <> VieilLine then
  59.     if VieilLine = choix_line then
  60.       nothing()
  61.     else
  62.       set the foreColor of line VieilLine of field the memberNum of sprite the currentSpriteNum to forcol
  63.     end if
  64.     if X = choix_line then
  65.       nothing()
  66.     else
  67.       set the foreColor of line X of member the memberNum of sprite the currentSpriteNum to roll
  68.     end if
  69.   else
  70.     if X = choix_line then
  71.       nothing()
  72.     else
  73.       set the foreColor of line X of member the memberNum of sprite the currentSpriteNum to roll
  74.     end if
  75.   end if
  76. end
  77.  
  78. on choix_ligne
  79.   global choix_line
  80.   if choix_line <> VOID then
  81.     set the foreColor of line choix_line of member the memberNum of sprite the currentSpriteNum to select
  82.   else
  83.     if choix_line <> VOID then
  84.       set the foreColor of line choix_line of member the memberNum of sprite the currentSpriteNum to forcol
  85.     end if
  86.   end if
  87. end
  88.